#RadioBox
cmake_minimum_required(VERSION 2.8)
project(radiopi)
add_definitions(-std=c++0x)

add_executable(wifisoundsystem
    src/hw/SPI_Device.cpp
    src/hw/Samsung_20T202DA2JA.cpp
    src/hw/RPi_GPIO.cpp
    src/hw/Button.cpp
    src/hw/PushButton.cpp
    src/hw/SwitchButton.cpp
    src/hw/LedControl.cpp
    src/modules/module.cpp
    src/modules/WebRadio.cpp
    src/modules/StandbyControl.cpp
    src/modules/WifiControl.cpp
    src/WebStationDataStore.cpp
    src/WifiCredentialDataStore.cpp
    src/Coordinator.cpp
    src/util.cpp
    src/main.cpp)

include_directories(inc)

#curl
#include_directories(/usr/local/include)
#TARGET_LINK_LIBRARIES(wifisoundsystem curl)

include_directories(/usr/include/gstreamer-1.0)
include_directories(/usr/include/glib-2.0)
include_directories(/usr/lib/arm-linux-gnueabihf/glib-2.0/include)
include_directories(/usr/include/libxml2)
##### g_value_get_boolean not define
#message (STATUS ${CMAKE_THREAD_LIBS_INIT})
TARGET_LINK_LIBRARIES(wifisoundsystem gobject-2.0)
# for g_source_remove
TARGET_LINK_LIBRARIES(wifisoundsystem glib-2.0)
TARGET_LINK_LIBRARIES(wifisoundsystem gstreamer-1.0)

# if no link to pthread, runtime error when starting thread
find_package(Threads REQUIRED)
TARGET_LINK_LIBRARIES(wifisoundsystem ${CMAKE_THREAD_LIBS_INIT})

#boost
#find_package(Boost 1.50.0 EXACT COMPONENTS program_options REQUIRED )
find_package(Boost 1.50.0 EXACT REQUIRED )
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
#useless so far coz property_tree is header only, but keep for future if needed
#TARGET_LINK_LIBRARIES(wifisoundsystem ${Boost_LIBRARIES} )

#debug
#cmake -DCMAKE_BUILD_TYPE=Debug ..


